package cn.ekuma.epos.crm.contract.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;

import com.openbravo.bean.crm.contract.Contract;
import com.openbravo.pos.base.AppLocal;

public class ContractTableModel extends AbstractDTOTableModel<Contract>{

	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		Contract obj=getObj(rowIndex);
		switch(columnIndex){
		     case 0:
			     return obj.getNumID();
		     case 1:
			     return obj.getContractType();
		     case 2:
			     return obj.getEffectiveDate();
		     case 3:
		    	 return obj.getSubject();
		     case 4:
		    	 return obj.getUserMan();
		     case 5:
		    	 return obj.getCallTime();
		     case 6:
		    	 return obj.getSubjectDesc();
		     case 7:
		    	 return obj.getRelationMan();
		     case 8:
		    	 return obj.getAmount();
		     case 9:
		    	 return obj.getNextTime();
		     case 10:
		    	 return obj.getPriority();
		     case 11:
		    	 return obj.getEndTime();
		     case 12:
		    	 return obj.getState();
		}
		return null;
	}

	@Override
	public String[] getColumnNames() {
		return new String[]{
				AppLocal.getIntString("label.Contract.NumID"),
				AppLocal.getIntString("label.Contract.ContractType"),
				AppLocal.getIntString("label.Contract.EffectiveDate"),	
				AppLocal.getIntString("label.StateObject.subject"),
				AppLocal.getIntString("label.StateObject.userMan"),
				AppLocal.getIntString("label.StateObject.callTime"),
				AppLocal.getIntString("label.StateObject.subjectDesc"),
				AppLocal.getIntString("label.StateObject.relationMan"),
				AppLocal.getIntString("label.Contract.amount"),
				AppLocal.getIntString("label.StateObject.nextTime"),
				AppLocal.getIntString("label.StateObject.priority"),
				AppLocal.getIntString("label.StateObject.endTime"),
				AppLocal.getIntString("label.StateObject.state")
				
		};
	}
}